package com.ctvit.cch.web.controller;

import com.ctvit.cch.core.pojo.dto.creative.CreativeShotFrameEditDTO;
import com.ctvit.cch.core.service.ICreativeShotFrameService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 分镜镜头Controller
 *
 * @author heyingcheng
 * @date 2025/11/06
 */
@RestController
@RequestMapping("/creative/shot/frame")
public class CreativeShotFrameController extends BaseController {

    private final ICreativeShotFrameService creativeShotFrameService;

    public CreativeShotFrameController(ICreativeShotFrameService creativeShotFrameService) {
        this.creativeShotFrameService = creativeShotFrameService;
    }

    /** 
     * 修改分镜镜头
     * 
     * @param dto 分镜镜头信息
     * @return {@link AjaxResult} 修改结果
     */
    @PreAuthorize("@ss.hasPermi('creative:shot:frame:edit')")
    @PostMapping("edit")
    public AjaxResult edit(@RequestBody @Validated CreativeShotFrameEditDTO dto) {
        return toAjax(creativeShotFrameService.edit(dto));
    }


}